<?PHP
include_once "ini.php";

$position = $_POST['position'];
$dir = $_POST['dir'];
$up = $_POST['up'];
$nom = $_POST['pseudo'];

dbconnect();

if ($position != "")
{
    $sql2 = "UPDATE `users` SET `position_cam` = '".$position."', orientation_dir = '".$dir."', orientation_up = '".$up."' WHERE `users`.`nom_user` = '".$nom."' LIMIT 1 ;";
    $requete2 = mysql_query($sql2);
    if (!$requete2)
    {
        echo "SQL error : ", $sql2;
        exit ;
    }
    else
    {
        echo "save last position done \r\n";

    }
}
else
{
    echo "pas de position";
}
dbclose();
?>
